<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>美容院管理 - 销售业绩管理系统</title>
<style type="text/css">
<!--
.STYLE1 {	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}
.STYLE6 {font-size: 12px; }
.STYLE7 {font-size: 12px; background-color: #f5f5f5;margin:0;}
body { 
margin:0;
}
.STYLE8 {color: #FF0000}
-->
</style>
</head>

<body margin=0>

<table width="100%" bgcolor="#FFFFFF"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="28" class="STYLE7">美容院管理 &gt;美容院信息提交</td>
  </tr>
  <tr>
    <td valign="top"><table width="50%" align="center" >
      <tr>
        <td height="25" colspan="2" bordercolor="#000000" bgcolor="#1C94C4"><div align="center" class="STYLE1">美容院信息创建</div></td>
      </tr>
      <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;所属业务员名称：</div>
        </div></td>
		  <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
		  <input id="ywyid" type="hidden"></input>
          <input id="ywyname" name="textfield3" type="text"  disabled="disabled" size="15"/>
          </label>
          <label>
          <a href="#" onclick="showUsers()"><input type="button" name="Submit2" value="选择业务员名称" /></a>          </label>
		  <span class="STYLE8">*</span></span></td>
	  <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;美容院名称：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
         <input id="mryname" name="textfield4" type="text" /><span class="STYLE8">*</span>
        </span></td>
      </tr>
      <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;美容院编号：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
         <input id="mrybh" name="textfield4" type="text" /><span class="STYLE8">*</span>
        </span></td>
      </tr>
        <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;是否为新店：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
          <input id="isnew" type="checkbox" style="margin-left:20px;"></input>
        </span></td>
      </tr>
	  	 <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;位置分布：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><select id="wzfb" name="select">
		
          <option >左</option>
          <option>右</option>
        
        </select>
        </td>
	  </tr> 
	   <!-- <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;初始核销积分：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
          <input id="ljhxjf" name="textfield4" type="text" size="10" value="0"/>
        </span></td>
      </tr> -->
	  <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;地址：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><span class="STYLE6">
          <input id="address" type="text" name="textfield" />
          </label>
        </span></td>
      </tr>
      <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;所属城市：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><select id="cities" name="select">
        </select></td>
      </tr>
	  <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;来源类型：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><select id="lylx" name="select">
          <option selected="selected">推荐</option>
          <option>朋友介绍</option>
          <option>产品质量</option>
        </select>
        </td>
	  </tr>
	  <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;联系人(法人)：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><input id="lxr" name="textfield22" type="text" /></td>
      </tr>
      
      <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;联系电话：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><input id="telphone" name="textfield222"/></td>
      </tr>
       <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;银行卡号：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><input id="banknum" name="banknum" /></td>
      </tr>
       <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;累计积分：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><input id="initintegral" name="initintegral" value="0" /></td>
      </tr>
	  <tr>
        <td height="25" bgcolor="#f5f5f5"><div align="right" class="STYLE6">
          <div align="left">&nbsp;备注：</div>
        </div></td>
        <td height="25" bgcolor="#f5f5f5"><textarea id="bz" name="textarea" rows="5"></textarea></td>
	  </tr>
      <tr>
        <td height="25" colspan="2" bgcolor="#1C94C4"><div align="center" class="STYLE6">
            <form action="" method="post" name="form1" id="form1">
              <label>
              <input type="button" name="Submit" value="创 建"  onclick="winalert()"/>
              </label>
            </form>
        </div></td>
      </tr>
    </table></td>
  </tr>
</table>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
<script language="javascript">
$.get("../user/fetchcities",{},function(json){
	var opStr = "";
	for(var i = 0,l = json.length ; i < l ; i++)
	{
		opStr += "<option>" + json[i].CityName + "</option>";
	}
	$("#cities").empty().append(opStr);
});
function winalert(){
	var ywyname = $("#ywyname").val();
	var mryname = $("#mryname").val();
	var mrybh = $("#mrybh").val();
	if(ywyname == null || ywyname == ""){
		alert("请先选择业务员！");
		return;
	}
	if(mryname == null || mryname == ""){
		alert("请填写美容院名称！");
		return;
	}
	if(mrybh == null || mrybh == ""){
		alert("请填写美容院编号！");
		return;
	}
	$.post("../shop/add",{
		ywyid:$("#ywyid").val(),
		ywyname:$("#ywyname").val(),
		mryname:$("#mryname").val(),
		mrybh:$("#mrybh").val(),
		wzfb:$("#wzfb").val(),
		//ljhxjf:$("#ljhxjf").val(),
		address:$("#address").val(),
		initintegral:$("#initintegral").val(),
		cities:$("#cities").val(),
		telphone:$("#telphone").val(),
		banknum:$("#banknum").val(),
		bz:$("#bz").val(),
		isnew:$("#isnew").prop("checked"),
		lylx:$("#lylx").val(),
		lxr:$("#lxr").val()
	},function(json){
		alert("添加成功！");
	});
}
function showUsers(){
window.open('VerificationUsers.html','_blank','width=500,height=600,left=200,top=150,resizable=1,status=1'); 
}
function showUsers(){
	var value = showModalDialog('VerificationUsers.html','选择业务员','dialogWidth:500px;dialogHeight:600px; dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes');
	var ywy = value.split(",");
	$("#ywyid").prop("value",ywy[0]);
	$("#ywyname").prop("value",ywy[1]);
	$.get("../shop/shopchild",{id:ywy[0]},function(json){
		if(!json)
			{
				$("#wzfb").prop("disabled","disabled");
				$("#wzfb").prop("value","左");
			}
	});
}
</script>
</body>
</html>
